<?php

namespace App\Admin\Http\Requests;


class ArticleCategoryRequest extends Request
{
  /**
   * Determine if the user is authorized to make this request.
   *
   * @return bool
   */
  public function authorize()
  {
    return true;
  }

  public function rules()
  {
    return [
        'name' => 'required|max:100',
        'display' => 'required|boolean',
        'recommended' => 'required|boolean',
        'description' => 'max:200',
        'sort' => 'required|integer'
    ];
  }

  public function attributes()
  {
    return [
        'name' => '名称',
        'display' => '显示',
        'recommended' => '推荐',
        'description' => '描述',
        'sort' => '排序',
    ];
  }

}
